import cn.stylefeng.guns.sys.core.util.DateUtil;

import java.text.ParseException;

public class test111 {
    public static void main(String[] args) throws ParseException {
        System.out.println(DateUtil.getLastMonth());
        String date="2022-07-11 00:00:00";
        long timestamp= DateUtil.getTimestamp(date);
        System.out.println("timestamp:"+timestamp);

        //long times=1657505908;
        String timeStamp="1657468800";
        String dateTime=DateUtil.timeStamp2Date(timeStamp, "yyyy-MM-dd HH:mm:ss");
        System.out.println("dateTime:"+dateTime);


        String yesterday=DateUtil.getYesterDayDate();
        String  startTime=yesterday+" 00:00:00";
        String  endTime=yesterday+" 23:59:59";
        long timestampBegin= DateUtil.getTimestamp(startTime);
        long timestampEnd= DateUtil.getTimestamp(endTime);
        System.out.println("begin:"+timestampBegin);
        System.out.println("end:"+timestampEnd);
    }


}
